#ifndef __GPIO_OPERATION

#define __GPIO_OPERATION

#include<iostream>
#include<string.h>
using namespace std;


class GPIO_OPERATION
{
public:
    // virtual  GPIO_OPERATION()=0;

    /**
     * @brief 设置 此 GPIO 引脚为高电平
     *
     */
    virtual void setHighLevel() = 0;

    /**
     * @brief 设置 此 GPIO 引脚为低电平
     *
     */
    virtual void setLowLevel() = 0;

    /**
     * @brief 反转此GPIO引脚的电平
     *
     */
    virtual void reverseLevel() = 0;
};

class SimpleGpioOperationForTest : public GPIO_OPERATION
{

public:
    /**
     * @brief 设置 此 GPIO 引脚为高电平
     *
     */
    void setHighLevel() ;

    /**
     * @brief 设置 此 GPIO 引脚为低电平
     *
     */
    void setLowLevel() ;

    /**
     * @brief 反转此GPIO引脚的电平
     *
     */
    void reverseLevel() ;

    SimpleGpioOperationForTest(string gpio, int pins)
    {

        cout << "初始化:" << gpio << "的" << pins << "号引脚" << endl;
        this->gpio = gpio;
        this->pins = pins;
        this->pin_status = false;
    };

private:
    string gpio;
    int pins;
    bool pin_status;
};

#endif // !__GPIO_OPERATION
